package com.example.administrator.appjiamzhi;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListView;

import com.ashokvarma.bottomnavigation.BottomNavigationBar;
import com.ashokvarma.bottomnavigation.BottomNavigationItem;


import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;



import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;

import com.ashokvarma.bottomnavigation.BottomNavigationBar;
import com.ashokvarma.bottomnavigation.BottomNavigationItem;


/**
 * Created by Administrator on 2016/12/29.
 */
public class zhuye extends AppCompatActivity {
    private ListView zhuye;
    private BaseAdapter adapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.zhuye);
        init();
        BottomNavigationBar bottomNavigationBar = (BottomNavigationBar) findViewById(R.id.Tab);
        bottomNavigationBar .addItem(new BottomNavigationItem(R.drawable.feilei,"兼职分类"))

                .addItem(new BottomNavigationItem(R.drawable.zhuye,"主页"))

                .addItem(new BottomNavigationItem(R.drawable.genren,"个人中心"))

                .initialise();
        bottomNavigationBar.setTabSelectedListener(new BottomNavigationBar.OnTabSelectedListener(){

            @Override public void onTabSelected(int position) {
            }

            @Override public void onTabUnselected(int position) { }

            @Override public void onTabReselected(int position) { }

        });
    }
    public void init() {
        zhuye = (ListView)findViewById(R.id.list_item);
        adapter = new BaseAdapter() {
String []add = {"a","c","s","d","s","s","d","a","c","s","d","s","s","d","a","c","s","d","s","s","d","c","s","d","s","s","d","a","c","s","d","s","s","d","a","c","s","d","s","s","d","c","s","d","s","s","d","a","c","s","d","s","s","d","a","c","s","d","s","s","d","c","s","d","s","s","d","a","c","s","d","s","s","d","a","c","s","d","s","s","d"};
            @Override
            public Object getItem(int position) {
                return null;
            }

            @Override
            public long getItemId(int position) {
                return 0;
            }

            @Override
            public View getView(int position, View convertView, ViewGroup parent) {
                convertView = LayoutInflater.from(zhuye.this).inflate(R.layout.list_vew,null);
               TextView tv = (TextView) convertView.findViewById(R.id.tv_ww);
                tv.setText(add[position]);
                return convertView;

            }
            @Override
            public int getCount() {
                return add.length;
            }
        };
        zhuye.setAdapter(adapter);

    }
}
